<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            background: url("image/timg.jpg");
        }

        div {
            box-sizing: border-box;
        }

        .box, .cube {
            transform-style: preserve-3d;
            margin: 100px auto 0;
        }

        .box {
            transform: rotateX(-35deg);
        }

        .cube, .cube > div {
            height: 200px;
            width: 200px;
        }

        .cube {
            position: relative;
            animation: trans 12s infinite;
        }

        .cube > div {
            position: absolute;
            left: 0;
            top: 0;
            border: 2px solid white;
            background: rgba(0, 0, 0, .3);
            text-align: center;
            font-size: 50px;
            font-family: 方正启体简体, serif;
            color: white;
            line-height: 200px;
        }

        .front {
            transform: translateZ(100px);
        }

        .back {
            transform: translateZ(-100px) rotateY(180deg);
        }

        .left {
            transform: translateX(-100px) rotateY(-90deg);
        }

        .right {
            transform: translateX(100px) rotateY(90deg);
        }

        .top {
            transform: translateY(-100px) rotateX(90deg);
        }

        .bottom {
            transform: translateY(100px) rotateX(-90deg);
        }

        @keyframes trans {
            0% {
                transform: rotateY(45deg);
            }
            10% {
                transform: rotateY(135deg);
            }
            25% {
                transform: rotateY(135deg);
            }
            35% {
                transform: rotateY(225deg);
            }
            50% {
                transform: rotateY(225deg);
            }
            60% {
                transform: rotateY(315deg);
            }
            75% {
                transform: rotateY(315deg);
            }
            85% {
                transform: rotateY(405deg);
            }
            100% {
                transform: rotateY(405deg);
            }
        }
    </style>
</head>
<body>
<div class="box">
    <div class="cube">
        <div class="front">front</div>
        <div class="back">back</div>
        <div class="left">left</div>
        <div class="right">right</div>
        <div class="top">top</div>
        <div class="bottom">bottom</div>
    </div>
</div>
</body>
</html>